// @Author EthanScriptOn
// @Desc
package config_source_loader_management

import (
	"gitee.com/fatzeng/srf_switch_basic_components/initialization"
	"gitee.com/fatzeng/srf_switch_config/config_define"
	"gitee.com/fatzeng/srf_switch_config/config_source_loader"
	"math"
)

var mainSourceLoaders = func() *initialization.OnceInitializer {
	initializer := initialization.GenerateOnceInitializer(config_define.ParserPositionTag, config_define.MainSourceLoadersInitTag)
	err := initializer.Set(math.MaxInt, func() (result interface{}, err error) {
		return config_source_loader.GenerateMultiSourceLoaders(), nil
	})
	if err != nil {
		panic(err)
	}
	return initializer
}()
